#ifndef DACOMMANDGRAPHICSTEXTITEMPROPERTY_H
#define DACOMMANDGRAPHICSTEXTITEMPROPERTY_H

#include <DAStandardGraphicsTextItem.h>
#include <QUndoCommand>

namespace DA
{
/**
 * @brief 改变字体
 */
class DACommandGraphicsTextItemsChangeFont : public QUndoCommand
{
public:
    DACommandGraphicsTextItemsChangeFont(const QList< DAStandardGraphicsTextItem* >& items,
                                         const QList< QFont >& newfonts,
                                         QUndoCommand* parent = nullptr);
    ~DACommandGraphicsTextItemsChangeFont();

    virtual void redo();
    virtual void undo();

private:
    QList< DAStandardGraphicsTextItem* > m_items;
    QList< QFont > m_oldFonts;
    QList< QFont > m_newFonts;
};
/**
 * @brief 改变颜色
 */
class DACommandGraphicsTextItemsChangeColor : public QUndoCommand
{
public:
    DACommandGraphicsTextItemsChangeColor(const QList< DAStandardGraphicsTextItem* >& items,
                                          const QList< QColor >& newcolors,
                                          QUndoCommand* parent = nullptr);
    ~DACommandGraphicsTextItemsChangeColor();

    virtual void redo();
    virtual void undo();

private:
    QList< DAStandardGraphicsTextItem* > m_items;
    QList< QColor > m_oldColors;
    QList< QColor > m_newColors;
};
}  // namespace DA

#endif  // DACOMMANDGRAPHICSTEXTITEM_H
